/*
dyp-rd.h
offer dyp rd supersonic sensor module driver api
designed by lunanting

-------------------------
2020-07-13 19:13:36
create file
-------------------------
*/
#ifndef __DYP_RD_H
#define __DYP_RD_H

#include "../../bsp/base_type.h"
#include "../../../include/aos/hal/uart.h"








/***************************************weak define*******************************/
extern void xp_dyp_recive_deal_api(u8 data,u8 len); //deal dyp module recive data




/**************************************data type define**********************************/



//dyp class
typedef struct{
    uart_dev_t uart;    //uart
    u8 init;    //init state
    u8 rec_buf[10];     //recive buffer
    u32 rec_len;     //recive length
    u16 dis;    //distance

}DYP_class;




/********************************************function define*********************************/
extern int xp_dyp_init(u8 port,int speed);  // dyp-rd module init
extern int xp_dyp_dis_get(void);    //module dis get

#endif
//end of the file
